import Mock from 'mockjs'

const modelNames = ['Dashboard', 'sys', 'SysMenu', 'SysDep', 'SysRole', 'Form']

const data = function() {
  const a = []
  modelNames.forEach(modelName => {
    const c = {}
    c.name = modelName
    c.num = Mock.Random.integer(0, 20)
    a.push(c)
  })
  return a
}

export default [
  {
    url: '/sysMenu/getMsgNum',
    type: 'get',
    response: config => {
      return {
        code: 200,
        msg: 'success',
        data: data()
      }
    }
  }
]
